/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package fonol.facades;

import fonol.entidades.Historialpantallas;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author Fredfred2
 */
@Stateless
public class HistorialpantallasFacade implements HistorialpantallasFacadeRemote {
    @PersistenceContext
    private EntityManager em;

    public void create(Historialpantallas historialpantallas) {
        em.persist(historialpantallas);
    }

    public void edit(Historialpantallas historialpantallas) {
        em.merge(historialpantallas);
    }

    public void remove(Historialpantallas historialpantallas) {
        em.remove(em.merge(historialpantallas));
    }

    public Historialpantallas find(Object id) {
        return em.find(fonol.entidades.Historialpantallas.class, id);
    }

    public List<Historialpantallas> findAll() {
        return em.createQuery("select object(o) from Historialpantallas as o").getResultList();
    }

}
